<script setup>
import {ElMessage} from "element-plus";
import {get} from "@/net";
import {useStore} from "@/stores/index.js";
import router from "@/router/index.js";

const store = useStore()

if(store.auth.user == null){
    get('/api/user/me',(massage)=>{
        store.auth.user  = massage
        router.push('/index')
    },()=>{
        store.auth.user = null
    })
}

</script>

<template>
  <router-view></router-view>
</template>

<style scoped>

</style>
